package com.eoner.middlelib.router.nofound;

import android.os.Bundle;
import android.widget.TextView;

import com.alibaba.android.arouter.facade.annotation.Autowired;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.eoner.baselib.R;
import com.eoner.baselib.activity.FCBaseActivity;
import com.eoner.baselib.widget.navgation.FCNavigationBar;
import com.eoner.middlelib.router.map.FCRouterPath;

/**
 * 文件名：FCDefaultActivity
 * 描 述：用于找不到页面而做的默认页面
 * 作 者：gyq
 * 时 间：2021-1-22
 */
@Route(path = FCRouterPath.NONE_PATH)
public class FCDefaultActivity extends FCBaseActivity {

    @Autowired(name = "refPath")
    String refPath;

    @Override
    protected int requireGetLayoutId() {
        return R.layout.activity_base_default;
    }

    @Override
    protected void requireSetCustomNavigationBar(FCNavigationBar navigationBar) {
        navigationBar.setTitle("未找到页面");
    }

    @Override
    protected void requireInitUIAndData(Bundle savedInstanceState) {
        TextView valueView = findViewById(R.id.tv_base_default_value);
        if (refPath != null) {
            valueView.setText("路径:"+refPath);
        }
    }
}
